<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>OCILIB (C and C++ Driver for Oracle): ocilib::Transaction Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">OCILIB (C and C++ Driver for Oracle)
   &#160;<span id="projectnumber">4.2.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>About</span></a></li>
      <li><a href="modules.html"><span>Documentation</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classocilib_1_1_transaction.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="classocilib_1_1_transaction-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">ocilib::Transaction Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Oracle <a class="el" href="classocilib_1_1_transaction.html" title="Oracle Transaction object. ">Transaction</a> object.  
 <a href="classocilib_1_1_transaction.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="ocilib_8hpp_source.html">ocilib.hpp</a>&gt;</code></p>

<p>Inherits <a class="el" href="classocilib_1_1_handle_holder.html">ocilib::HandleHolder&lt; OCI_Transaction * &gt;</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aad56be300eb5c62bea0e622eb25416b4"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4">TransactionFlagsValues</a> { , <br />
&#160;&#160;<a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4a569001e3a5a3d415b756c242b298c3ec">New</a> = OCI_TRS_NEW, 
<a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4a165c1301bce197492f9c1898cce6bf23">Tight</a> = OCI_TRS_TIGHT, 
<a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4ad0bcf5edb8c2949e24d3664c47c225ec">Loose</a> = OCI_TRS_LOOSE, 
<a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4af36f17c42f241c59e4b1a04750e085e0">ReadOnly</a> = OCI_TRS_READONLY, 
<br />
&#160;&#160;<a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4a4545bd6054a1841d65ac77340661965d">ReadWrite</a> = OCI_TRS_READWRITE, 
<a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4ac2d7a8f0588816018384575b92632806">Serializable</a> = OCI_TRS_SERIALIZABLE
<br />
 }</td></tr>
<tr class="memdesc:aad56be300eb5c62bea0e622eb25416b4"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classocilib_1_1_transaction.html" title="Oracle Transaction object. ">Transaction</a> flags enumerated values.  <a href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4">More...</a><br /></td></tr>
<tr class="separator:aad56be300eb5c62bea0e622eb25416b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a91dd5392871791c3687f7a6b49a9f5"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classocilib_1_1_flags.html">Flags</a>&lt; <a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4">TransactionFlagsValues</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_transaction.html#a0a91dd5392871791c3687f7a6b49a9f5">TransactionFlags</a></td></tr>
<tr class="memdesc:a0a91dd5392871791c3687f7a6b49a9f5"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classocilib_1_1_transaction.html" title="Oracle Transaction object. ">Transaction</a> flags.  <a href="#a0a91dd5392871791c3687f7a6b49a9f5">More...</a><br /></td></tr>
<tr class="separator:a0a91dd5392871791c3687f7a6b49a9f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a91734fb6f2111307c621d779699c1a41"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_transaction.html#a91734fb6f2111307c621d779699c1a41">Transaction</a> (const <a class="el" href="classocilib_1_1_connection.html">Connection</a> &amp;connection, unsigned int timeout, <a class="el" href="classocilib_1_1_transaction.html#a0a91dd5392871791c3687f7a6b49a9f5">TransactionFlags</a> flags, <a class="el" href="group___ocilib_c_api_datatypes.html#ga56df9baec6ef3397e359102b323b3d7e">OCI_XID</a> *pxid=NULL)</td></tr>
<tr class="memdesc:a91734fb6f2111307c621d779699c1a41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new global transaction or a serializable/read-only local transaction.  <a href="#a91734fb6f2111307c621d779699c1a41">More...</a><br /></td></tr>
<tr class="separator:a91734fb6f2111307c621d779699c1a41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3b4d4b7e11700048400ec7264fb10a5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac3b4d4b7e11700048400ec7264fb10a5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_transaction.html#ac3b4d4b7e11700048400ec7264fb10a5">Prepare</a> ()</td></tr>
<tr class="memdesc:ac3b4d4b7e11700048400ec7264fb10a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prepare a global transaction validation. <br /></td></tr>
<tr class="separator:ac3b4d4b7e11700048400ec7264fb10a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2abaae7bfa114d944b1a29ee66286383"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2abaae7bfa114d944b1a29ee66286383"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_transaction.html#a2abaae7bfa114d944b1a29ee66286383">Start</a> ()</td></tr>
<tr class="memdesc:a2abaae7bfa114d944b1a29ee66286383"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start global transaction. <br /></td></tr>
<tr class="separator:a2abaae7bfa114d944b1a29ee66286383"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcfc66c5dbea6f6c88ee10a947a80a44"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adcfc66c5dbea6f6c88ee10a947a80a44"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_transaction.html#adcfc66c5dbea6f6c88ee10a947a80a44">Stop</a> ()</td></tr>
<tr class="memdesc:adcfc66c5dbea6f6c88ee10a947a80a44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop current global transaction. <br /></td></tr>
<tr class="separator:adcfc66c5dbea6f6c88ee10a947a80a44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33334401b173df447f3f2e0e77c1bdbb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a33334401b173df447f3f2e0e77c1bdbb"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_transaction.html#a33334401b173df447f3f2e0e77c1bdbb">Resume</a> ()</td></tr>
<tr class="memdesc:a33334401b173df447f3f2e0e77c1bdbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resume a stopped global transaction. <br /></td></tr>
<tr class="separator:a33334401b173df447f3f2e0e77c1bdbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38c31438fa22d1d83c0aba3084b925fe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a38c31438fa22d1d83c0aba3084b925fe"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_transaction.html#a38c31438fa22d1d83c0aba3084b925fe">Forget</a> ()</td></tr>
<tr class="memdesc:a38c31438fa22d1d83c0aba3084b925fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cancel the prepared global transaction validation. <br /></td></tr>
<tr class="separator:a38c31438fa22d1d83c0aba3084b925fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4903f1ea8e9aff97d2f6984f54bde917"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classocilib_1_1_transaction.html#a0a91dd5392871791c3687f7a6b49a9f5">TransactionFlags</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_transaction.html#a4903f1ea8e9aff97d2f6984f54bde917">GetFlags</a> () const </td></tr>
<tr class="memdesc:a4903f1ea8e9aff97d2f6984f54bde917"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the transaction mode.  <a href="#a4903f1ea8e9aff97d2f6984f54bde917">More...</a><br /></td></tr>
<tr class="separator:a4903f1ea8e9aff97d2f6984f54bde917"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a313e69f4dc0b34122562a64a9bd44b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a313e69f4dc0b34122562a64a9bd44b"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_transaction.html#a5a313e69f4dc0b34122562a64a9bd44b">GetTimeout</a> () const </td></tr>
<tr class="memdesc:a5a313e69f4dc0b34122562a64a9bd44b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the transaction Timeout. <br /></td></tr>
<tr class="separator:a5a313e69f4dc0b34122562a64a9bd44b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Oracle <a class="el" href="classocilib_1_1_transaction.html" title="Oracle Transaction object. ">Transaction</a> object. </p>
<p>This class wraps the OCILIB object handle OCI_Transaction and its related methods </p>

<p>Definition at line <a class="el" href="ocilib_8hpp_source.html#l02378">2378</a> of file <a class="el" href="ocilib_8hpp_source.html">ocilib.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a0a91dd5392871791c3687f7a6b49a9f5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classocilib_1_1_flags.html">Flags</a>&lt;<a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4">TransactionFlagsValues</a>&gt; <a class="el" href="classocilib_1_1_transaction.html#a0a91dd5392871791c3687f7a6b49a9f5">ocilib::Transaction::TransactionFlags</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="classocilib_1_1_transaction.html" title="Oracle Transaction object. ">Transaction</a> flags. </p>
<p>Possible values are <a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4" title="Transaction flags enumerated values. ">Transaction::TransactionFlagsValues</a> </p>

<p>Definition at line <a class="el" href="ocilib_8hpp_source.html#l02413">2413</a> of file <a class="el" href="ocilib_8hpp_source.html">ocilib.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="aad56be300eb5c62bea0e622eb25416b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classocilib_1_1_transaction.html#aad56be300eb5c62bea0e622eb25416b4">ocilib::Transaction::TransactionFlagsValues</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="classocilib_1_1_transaction.html" title="Oracle Transaction object. ">Transaction</a> flags enumerated values. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="aad56be300eb5c62bea0e622eb25416b4a569001e3a5a3d415b756c242b298c3ec"></a>New&#160;</td><td class="fielddoc">
<p>(Global) Specifies tightly coupled and migratable branch </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aad56be300eb5c62bea0e622eb25416b4a165c1301bce197492f9c1898cce6bf23"></a>Tight&#160;</td><td class="fielddoc">
<p>(Global) Specifies a tightly coupled branch </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aad56be300eb5c62bea0e622eb25416b4ad0bcf5edb8c2949e24d3664c47c225ec"></a>Loose&#160;</td><td class="fielddoc">
<p>(Global) Specifies a loosely coupled branch </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aad56be300eb5c62bea0e622eb25416b4af36f17c42f241c59e4b1a04750e085e0"></a>ReadOnly&#160;</td><td class="fielddoc">
<p>(Global and local) start a read-only transaction </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aad56be300eb5c62bea0e622eb25416b4a4545bd6054a1841d65ac77340661965d"></a>ReadWrite&#160;</td><td class="fielddoc">
<p>(Global and local) start a read-write transaction </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="aad56be300eb5c62bea0e622eb25416b4ac2d7a8f0588816018384575b92632806"></a>Serializable&#160;</td><td class="fielddoc">
<p>(Global and local) start a serializable transaction </p>
</td></tr>
</table>

<p>Definition at line <a class="el" href="ocilib_8hpp_source.html#l02389">2389</a> of file <a class="el" href="ocilib_8hpp_source.html">ocilib.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a91734fb6f2111307c621d779699c1a41"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ocilib::Transaction::Transaction </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classocilib_1_1_connection.html">Connection</a> &amp;&#160;</td>
          <td class="paramname"><em>connection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>timeout</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classocilib_1_1_transaction.html#a0a91dd5392871791c3687f7a6b49a9f5">TransactionFlags</a>&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___ocilib_c_api_datatypes.html#ga56df9baec6ef3397e359102b323b3d7e">OCI_XID</a> *&#160;</td>
          <td class="paramname"><em>pxid</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a new global transaction or a serializable/read-only local transaction. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connection</td><td>- <a class="el" href="classocilib_1_1_connection.html" title="A connection or session with a specific database. ">Connection</a> </td></tr>
    <tr><td class="paramname">timeout</td><td>- Time that a transaction stays inactive after being stopped </td></tr>
    <tr><td class="paramname">flags</td><td>- <a class="el" href="classocilib_1_1_transaction.html" title="Oracle Transaction object. ">Transaction</a> flags </td></tr>
    <tr><td class="paramname">pxid</td><td>- pointer to a global transaction identifier structure</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>For local transaction, don't use the 'pxid' parameter </dd></dl>

<p>Definition at line <a class="el" href="ocilib__impl_8hpp_source.html#l01585">1585</a> of file <a class="el" href="ocilib__impl_8hpp_source.html">ocilib_impl.hpp</a>.</p>

<p>References <a class="el" href="namespaceocilib.html#ada9a964035fd103d4ec07500f404a658">ocilib::Check()</a>, <a class="el" href="group___ocilib_c_api_transactions.html#ga206d14aa9a25befd218a7f91a56d5c47">OCI_TransactionCreate()</a>, and <a class="el" href="group___ocilib_c_api_transactions.html#gaab96c358fd6074b5d4f027bd86cfa229">OCI_TransactionFree()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4903f1ea8e9aff97d2f6984f54bde917"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classocilib_1_1_transaction.html#a0a91dd5392871791c3687f7a6b49a9f5">Transaction::TransactionFlags</a> ocilib::Transaction::GetFlags </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the transaction mode. </p>
<dl class="section note"><dt>Note</dt><dd>: see <a class="el" href="classocilib_1_1_transaction.html#a91734fb6f2111307c621d779699c1a41" title="Create a new global transaction or a serializable/read-only local transaction. ">Transaction()</a> for possible values </dd></dl>

<p>Definition at line <a class="el" href="ocilib__impl_8hpp_source.html#l01620">1620</a> of file <a class="el" href="ocilib__impl_8hpp_source.html">ocilib_impl.hpp</a>.</p>

<p>References <a class="el" href="namespaceocilib.html#ada9a964035fd103d4ec07500f404a658">ocilib::Check()</a>, and <a class="el" href="group___ocilib_c_api_transactions.html#gae54af0bfb81cd2d21bea6451db491e60">OCI_TransactionGetMode()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceocilib.html">ocilib</a></li><li class="navelem"><a class="el" href="classocilib_1_1_transaction.html">Transaction</a></li>
    <li class="footer">Generated on Mon Mar 21 2016 22:26:39 for OCILIB (C and C++ Driver for Oracle) by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
